﻿@model Resto.CostControl.Core.ProjectSite
@{
    ViewBag.Title = "项目点维护";
    Layout = "~/Views/Shared/_LayoutForm.cshtml"; 
}
<style type="text/css">
    .pageFormContent p
    {
        width: auto;
    }
</style>
@Html.Css("dailog")
@Html.Js("dailog")
@using (Html.AjaxBeginForm("Save"))
{ 
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.PMUserId)
        @Html.HiddenFor(model => model.ChefUserId)
        @Html.DWZTextBoxFor(model => model.Name, new { style = "width:340px" }).Required()
        @Html.DWZTextBoxFor(model => model.ShortName, new { style = "width:340px" }).Required()
        @Html.DWZDropDownListFor(model => model.RegionId, "Region", new { style = "width:348px" })
        @Html.DWZTextBoxFor(model => model.PMUserName, @Url.GridLink("setuser", "", "SelectMUser()", new { style = "display: block; float: left; padding-top:5px;" }), new { style = "width:100px" }).ReadOnly(true).Required()
        @Html.DWZTextBoxFor(model => model.ChefUserName, @Url.GridLink("setuser", "", "SelectChefUser()", new { style = "display: block; float: left; padding-top:5px;" }), new { style = "width:100px" }).ReadOnly(true).Required()
        @Html.DWZTextBoxFor(model => model.Address, new { style = "width:340px" })
        @Html.DWZTextBoxFor(model => model.DeliveryAddress, new { style = "width:340px" })
    </div>
}
@Html.FormBar()
<script type="text/javascript">
    function SelectMUser(e) {
        OpenModelWindow('@Url.Action("SingleSelectUser", "SysSetting")', { caption: "选择用户", width: 380, height: 400, onclose: function (data) {
            if (data) {
                $("#PMUserId").val(data.Id);
                $("#PMUserName").val(data.text);
            }
        }
        });
    }
    function SelectChefUser(e) {
        OpenModelWindow('@Url.Action("SingleSelectUser", "SysSetting")', { caption: "选择用户", width: 380, height: 400, onclose: function (data) {
            if (data) {
                $("#ChefUserId").val(data.Id);
                $("#ChefUserName").val(data.text);
            }
        }
        });
    }
</script>
